-- GENERATED SPELL FOR [Shadow Council Warlock] --


function spell0_21302(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(37992,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_21302', 8000, 1)
end

function spell1_21302(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21302', 3000, 1)
end

function Sorts_21302(pUnit, Event)
local choix_sorts_21302 = math.random(0, 1)
if choix_sorts_21302 == 0 then
pUnit:RegisterEvent('spell0_21302', 1, 1)
end
if choix_sorts_21302 == 1 then
pUnit:RegisterEvent('spell1_21302', 1, 1)
end
end

function mob21302_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21302', math.random(1500, 3000), 1)
end

function mob21302_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21302_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21302_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21302, 1, 'mob21302_Action')
RegisterUnitEvent(21302, 2, 'mob21302_Leave')
RegisterUnitEvent(21302, 3, 'mob21302_Kill')
RegisterUnitEvent(21302, 4, 'mob21302_Die')
